<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>03JS数据类型</title>
</head>
<body>
<script>
    // JS数据类型 = 原始类型 + 引用类型
    //原始类型：number,string,boolean,null,undefined,symbol
    var a = 1;
    var b = 9.9;
    console.log(a,typeof a,b,typeof b);
    var c = "你";
    var d = "你好";
    console.log(c,typeof c,d,typeof d);
    var e = true;
    var f = false;
    console.log(e,typeof e,f,typeof f);
    //声明变量但未赋值，会得到undefined，未定义
    var g;
    console.log(g,typeof g);



    let obj = {
        name:"张三",
        age:18,
    };
    console.log(obj,typeof obj);
    console.log(obj.name,obj.age);

    obj.age = 19;
    console.log(obj);

    obj.like = "吃粑粑";
    console.log(obj);
    console.log(obj.like);
    console.log(obj.play);



    let arr = ['朱星百','王晨宇','红豆沙',1,6.6,false];
    console.log(arr,typeof arr);
    console.log(arr[0]);
    console.log(arr[3]);
    console.log(arr[10]);
</script>
</body>
</html>